package com.chazz.test;

import cn.hutool.db.ds.simple.SimpleDataSource;
import com.chazz.tools.ConnectionPools;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

public class testConnection {
    public static void main(String[] args) {
        ConnectionPools connectionPools = ConnectionPools.getInstace();
        System.out.println("connectionPools|||" + connectionPools);
        DataSource dataSource = connectionPools.getDataSource();
        System.out.println("dataSource|||" + dataSource);
        try {
            Connection connection = dataSource.getConnection();
            System.out.println("connection|||" + connection);
        } catch (SQLException e) {
            e.printStackTrace();
        }

    }
}
